<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class AddCallbackLogAgoraTable extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('callback_log_agora', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('channel_id', 40)->default('')->comment('频道ID');
            $table->integer('uid')->default(0)->comment('消息主体用户UID');
            $table->unsignedTinyInteger('msg_type')->default(0)->comment('消息类型');
            $table->text('detail')->comment('回调信息');
            $table->timestamps();
            $table->tinyInteger('flag')->default(1)->comment('状态');
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::table('callback_log_agora', function (Blueprint $table) {
            //
        });
    }
}
